3.6 \(\int \sin (e+f x) (2-3 \sin ^2(e+f x)) \, dx\)

Optimal. Leaf size=18 \[ \frac{\sin ^2(e+f x) \cos (e+f x)}{f} \]

[Out]

(Cos[e + f*x]*Sin[e + f*x]^2)/f

________________________________________________________________________________________

Rubi [A]  time = 0.0142884, antiderivative size = 18, normalized size of antiderivative = 1., number of steps used = 1, number of rules used = 1, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.053, Rules used = {3011} \[ \frac{\sin ^2(e+f x) \cos (e+f x)}{f} \]

Antiderivative was successfully verified.

[In]

Int[Sin[e + f*x]*(2 - 3*Sin[e + f*x]^2),x]

[Out]

(Cos[e + f*x]*Sin[e + f*x]^2)/f

Rule 3011

Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_) + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(A*Cos[e
 + f*x]*(b*Sin[e + f*x])^(m + 1))/(b*f*(m + 1)), x] /; FreeQ[{b, e, f, A, C, m}, x] && EqQ[A*(m + 2) + C*(m +
1), 0]

Rubi steps

\begin{align*} \int \sin (e+f x) \left (2-3 \sin ^2(e+f x)\right ) \, dx &=\frac{\cos (e+f x) \sin ^2(e+f x)}{f}\\ \end{align*}

Mathematica [B]  time = 0.0231559, size = 51, normalized size = 2.83 \[ \frac{2 \sin (e) \sin (f x)}{f}-\frac{2 \cos (e) \cos (f x)}{f}+\frac{9 \cos (e+f x)}{4 f}-\frac{\cos (3 (e+f x))}{4 f} \]

Antiderivative was successfully verified.

[In]

Integrate[Sin[e + f*x]*(2 - 3*Sin[e + f*x]^2),x]

[Out]

(-2*Cos[e]*Cos[f*x])/f + (9*Cos[e + f*x])/(4*f) - Cos[3*(e + f*x)]/(4*f) + (2*Sin[e]*Sin[f*x])/f

________________________________________________________________________________________

Maple [A]  time = 0.026, size = 31, normalized size = 1.7 \begin{align*}{\frac{ \left ( 2+ \left ( \sin \left ( fx+e \right ) \right ) ^{2} \right ) \cos \left ( fx+e \right ) -2\,\cos \left ( fx+e \right ) }{f}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(f*x+e)*(2-3*sin(f*x+e)^2),x)

[Out]

1/f*((2+sin(f*x+e)^2)*cos(f*x+e)-2*cos(f*x+e))

________________________________________________________________________________________

Maxima [A]  time = 0.95438, size = 30, normalized size = 1.67 \begin{align*} -\frac{\cos \left (f x + e\right )^{3} - \cos \left (f x + e\right )}{f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)*(2-3*sin(f*x+e)^2),x, algorithm="maxima")

[Out]

-(cos(f*x + e)^3 - cos(f*x + e))/f

________________________________________________________________________________________

Fricas [A]  time = 1.63936, size = 49, normalized size = 2.72 \begin{align*} -\frac{\cos \left (f x + e\right )^{3} - \cos \left (f x + e\right )}{f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)*(2-3*sin(f*x+e)^2),x, algorithm="fricas")

[Out]

-(cos(f*x + e)^3 - cos(f*x + e))/f

________________________________________________________________________________________

Sympy [A]  time = 0.847773, size = 53, normalized size = 2.94 \begin{align*} \begin{cases} \frac{3 \sin ^{2}{\left (e + f x \right )} \cos{\left (e + f x \right )}}{f} + \frac{2 \cos ^{3}{\left (e + f x \right )}}{f} - \frac{2 \cos{\left (e + f x \right )}}{f} & \text{for}\: f \neq 0 \\x \left (2 - 3 \sin ^{2}{\left (e \right )}\right ) \sin{\left (e \right )} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)*(2-3*sin(f*x+e)**2),x)

[Out]

Piecewise((3*sin(e + f*x)**2*cos(e + f*x)/f + 2*cos(e + f*x)**3/f - 2*cos(e + f*x)/f, Ne(f, 0)), (x*(2 - 3*sin
(e)**2)*sin(e), True))

________________________________________________________________________________________

Giac [A]  time = 1.11084, size = 35, normalized size = 1.94 \begin{align*} -\frac{\cos \left (f x + e\right )^{3}}{f} + \frac{\cos \left (f x + e\right )}{f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)*(2-3*sin(f*x+e)^2),x, algorithm="giac")

[Out]

-cos(f*x + e)^3/f + cos(f*x + e)/f